<script>
    /**
     * 钱包相关
     * @type {{passwordVerify: Function}}
     */
    module.exports = {
        passwordVerify:_.throttle(function(password,callback){
            if (typeof callback != 'function'){
                var callback = function(ret,message){
                    alert(message);
                }
            }

            axios.post('/ajax/validate/checkwalletpassword', {
                value:password,
            }).then(function (response) {
                if (response.data.code == 200) {
                    callback(true,'验证成功');
                } else {
                    callback(false,response.data.message || '验证失败');
                }
            }).catch(function (err) {
                callback(false,'验证失败');
            });
        },200)
    };
</script>